﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Media.Animation;
using System.Windows.Markup;
using System.Windows.Controls.Primitives;
using System.Collections.ObjectModel;


namespace UmlControlLibrary
{
    public class UmlRelationEnd : UmlElement
    {
        private string _label;
        public string Label
        {
            get { return _label; }
            set
            {
                _label = value;
                OnPropertyChanged("Label");
            }
        }

        public string Text
        {
            get
            {
                return EndElement.Name + " - " + Label;
            }
        }

        private UmlElement _endElement;
        public UmlElement EndElement
        {
            get { return _endElement; }
            set
            {
                _endElement = value;
                OnPropertyChanged("EndElement");
            }
        }

        public UmlRelationEnd(UmlElement element)
        {
            EndElement = element;
        }

        public override ObservableCollection<UmlElement> GetChilds()
        {
            ObservableCollection<UmlElement> elements = new ObservableCollection<UmlElement>();
            elements.Add(EndElement);
            return elements;
        }

    }
}
